package com.verisette.ncos.service.approver.gateway;

import java.util.List;

import org.corp.agi.common.util.BeanContextFactory;
import org.corp.agi.service.bean.ServiceRequest;
import org.corp.agi.service.bean.ServiceResponse;
import org.corp.agi.service.bizprocess.BusinessProcess;

import com.verisette.ncos.persistence.domain.CustomCustomerOrder;
import com.verisette.ncos.persistence.domain.TransCustomerOrder;

public class ApproverServiceImpl implements ApproverService{

	@Override
	public ServiceResponse<List<CustomCustomerOrder>> inquiryCustomerOrderList(
			ServiceRequest<Object> request) {
		BusinessProcess process = (BusinessProcess) BeanContextFactory.getBean("inquiryCustomerOrderProcess");
		return process.execute(request);
	}

	@Override
	public ServiceResponse<CustomCustomerOrder> getCustomerOrderById(
			ServiceRequest<Object> request) {
		BusinessProcess process = (BusinessProcess) BeanContextFactory.getBean("getCustomerOrderByIdProcess");
		return process.execute(request);
	}

	@Override
	public ServiceResponse<CustomCustomerOrder> submitApprove(
			ServiceRequest<Object> request) {
		BusinessProcess process = (BusinessProcess) BeanContextFactory.getBean("submitApproveProcess");
		return process.execute(request);
	}

	@Override
	public ServiceResponse<CustomCustomerOrder> submitNotApprove(
			ServiceRequest<Object> request) {
		BusinessProcess process = (BusinessProcess) BeanContextFactory.getBean("submitNotApproveProcess");
		return process.execute(request);
	}

	@Override
	public ServiceResponse<CustomCustomerOrder> submitPrint(
			ServiceRequest<Object> request) {
		BusinessProcess process = (BusinessProcess) BeanContextFactory.getBean("submitPrintProcess");
		return process.execute(request);
	}

	@Override
	public ServiceResponse<List<TransCustomerOrder>> inquiryTransCustomerOrder(
			ServiceRequest<TransCustomerOrder> request) {
		BusinessProcess process = (BusinessProcess) BeanContextFactory.getBean("inquiryTransCustomerOrderProcess");
		return process.execute(request);
	}
	
	@Override
	public ServiceResponse<TransCustomerOrder> getTransCustomerOrder(
			ServiceRequest<TransCustomerOrder> request) {
		BusinessProcess process = (BusinessProcess) BeanContextFactory.getBean("getTransCustomerOrderProcess");
		return process.execute(request);
	}

	@Override
	public ServiceResponse<TransCustomerOrder> submitOrderPrint(
			ServiceRequest<TransCustomerOrder> request) {
		BusinessProcess process = (BusinessProcess) BeanContextFactory.getBean("submitOrderPrintProcess");
		return process.execute(request);
	}

	@Override
	public ServiceResponse<TransCustomerOrder> submitOrderNotPrint(
			ServiceRequest<TransCustomerOrder> request) {
		BusinessProcess process = (BusinessProcess) BeanContextFactory.getBean("submitOrderNotPrintProcess");
		return process.execute(request);
	}
}
